﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Model.ywxt
{
    /// <summary>
    /// 业务系统的用户信息
    /// </summary>
    [Serializable]
    public class t_sys_user
    {
        #region 数据表名称
        public static readonly string TableName = "t_sys_user";
        #endregion

        #region 数据表字段结构
        public struct Columns
        {
            /// <summary>
            /// 用户id
            /// </summary>
            public static readonly string user_id = @"user_id";

            /// <summary>
            /// 用户登录名
            /// </summary>
            public static readonly string user_loginname = @"user_loginname";

            /// <summary>
            /// 用户真实姓名中文
            /// </summary>
            public static readonly string user_truename_cn = @"user_truename_cn";

            /// <summary>
            /// 用户真实姓名英文
            /// </summary>
            public static readonly string user_truename_en = @"user_truename_en";

            /// <summary>
            /// 用户邮箱
            /// </summary>
            public static readonly string user_email = @"user_email";

            /// <summary>
            /// 审批邮件
            /// </summary>
            public static readonly string sp_mail = @"sp_mail";

            /// <summary>
            /// 是否有效标志
            /// </summary>
            public static readonly string is_valid = @"is_valid";

            /// <summary>
            /// 创建时间
            /// </summary>
            public static readonly string create_date = @"create_date";


            /// <summary>
            /// 用户所属部门ID
            /// </summary>
            public static readonly string dept_id = @"dept_id";
        }
        #endregion

        #region 字段
        /// <summary>
        /// 用户ID
        /// </summary>
        public virtual string user_id { get; set; }

        /// <summary>
        /// 用户所属域（用于域认证）
        /// </summary>
        public virtual string user_domain { get; set; }

        /// <summary>
        /// 用户登录名
        /// </summary>
        public virtual string user_loginname { get; set; }

        /// <summary>
        /// 用户真实姓名中文
        /// </summary>
        public virtual string user_truename_cn { get; set; }

        /// <summary>
        /// 用户真实姓名英文
        /// </summary>
        public virtual string user_truename_en { get; set; }

        /// <summary>
        /// 用户邮箱
        /// </summary>
        public virtual string user_email { get; set; }

        /// <summary>
        /// 审批邮件
        /// </summary>
        public virtual string sp_mail { get; set; }


        /// <summary>
        /// 是否有效
        /// </summary>
        public virtual int is_valid { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime create_date { get; set; }

        /// <summary>
        /// 用户员工代码
        /// </summary>
        public virtual string user_code { get; set; }

        
        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual string user_roles { get; set; }

        /// <summary>
        /// 用户所属部门
        /// </summary>
        public virtual t_sys_department department { get; set; }

        /// <summary>
        /// 当前用户创建的审核记录列表
        /// </summary>
        public virtual IList<SimpleFlow.ApprovalRecord> MyApprovalReocords { get; set; }

        /// <summary>
        /// 当前用户审核的审核节点列表
        /// </summary>
        public virtual IList<SimpleFlow.ApprovalNode> MyApprovalNodes { get; set; }

        /// <summary>
        /// 当前用户审核的审核待办列表
        /// </summary>
        public virtual IList<SimpleFlow.ApprovalToDo> MyApprovalToDos { get; set; }

        /// <summary>
        /// 当前用户审核的审核角色
        /// </summary>
        public virtual IList<SimpleFlow.ApprovalToDoUserRole> MyApprovalUserRoles { get; set; }
        #endregion

        public t_sys_user()
        {
            MyApprovalReocords = new List<SimpleFlow.ApprovalRecord>();
            MyApprovalNodes = new List<SimpleFlow.ApprovalNode>();
            MyApprovalToDos = new List<SimpleFlow.ApprovalToDo>();
            MyApprovalUserRoles = new List<SimpleFlow.ApprovalToDoUserRole>();
        }
    }
}
